<!-- apps/frontend/modules/job/templates/indexSuccess.php -->

<?php use_stylesheet('jobs.css') ?>
<div id="jobs">
	 <?php foreach ($categories as $category): ?>
	 <div class="category_<?php echo Jobeet::slugify($category->getName()) ?>" >
			<div class="category">
				 <div class="feed">
						<a href="">Feed</a>
				 </div>
				 <!--h1><?php echo link_to($category,'category',	$category)
				 ?></h1-->
				 <h1><?php echo $category ?></h1>
			</div>
			<table class="jobs">
				 <thead>
						<tr>
							 <th align=left class="hlocation">Location</th>
							 <th align=left>Position</th>
							 <th align=left>Company</th>
							 <?php if (sfConfig::get('app_environment') == 'dev' ) {?><th align=left>Expires</th> <?php } ?>
						</tr>
				 </thead>
				 <tbody>
						<?php foreach ($category->getActiveJobs(sfConfig::get('app_max_jobs_on_catpage')) as $i => $job): ?>
						<tr class="<?php echo fmod($i, 2) ? 'even' : 'odd' ?>">
							 <td class="location"><?php echo $job->getLocation() ?></td>
							 <td class="position"><?php echo link_to($job->getPosition(), 'job_show_user',	$job) ?></td>
							 <td class="company">	<?php echo $job->getCompany() ?> </td>
							 <?php if (sfConfig::get('app_environment') == 'dev' ) {?><td class="createdAt"><?php echo $job->getExpiresAt() ?></td> <?php } ?>
						</tr>
					 <?php endforeach; ?>
				</table>
		 </div>
		 <?php endforeach; ?>
</div>
